import { gql } from '@apollo/client';

export const commitOrder_service = gql`
  mutation commitorder($params: PartialOrderInput!, $orderCode: String) {
    commitorder(params: $params, orderCode: $orderCode) {
      message
      code
    }
  }
`;

export const getOrdersByProduct_service = gql`
  query getorderByProduct($productId: String!) {
    getorderByProduct(productId: $productId) {
      message
      data {
        id
        name
        orderCode
        tel
        userId
        status
        buyNum
        buyPrice
        productId
        orgId
      }
    }
  }
`;

export const getOwnOrders_service = gql`
  query {
    getOrdersByUserId {
      data {
        id
        name
        orderCode
        tel
        status
        buyTime
        buyNum
        buyPrice
        productId
        orgId
        productName
        productLogo
        orgName
        orgLogo
        productType
      }
      message
    }
  }
`;
